<?php global $user, $base_url; ?>
<?php $user_info = user_load($user->uid); ?>
<?php $store_address = variable_get('wh_store_address'); ?>
<div class="user-home-wrapper">
    <h2>Developments</h2>

    <div id="top_buttons">
        <?php print l('Place your order from the store', 'packages', array('attributes' => array('class' => array('ui-button'))));?>
        <?php print l('Collect the parcel', 'boxes', array('attributes' => array('class' => array('ui-button'))));?>
    </div>
    <div id="reminders">
        <div id="_527897" class="reminder list-row cfa">
            <span class="reminder_icon">
                <img border="0" src="<?php print drupal_get_path('theme', 'warehouse') . '/images/address.png';?>"/>
            </span>

            <div class="reminder_message">Fill in the address of the parcel</div>
            <div class="reminder_action"><?php print l('Fill', 'preferences/address');?></div>
            <div class="reminder_close"></div>
            <div class="clear"></div>
        </div>
    </div>
    <div class="show_address_button"><?php print l('Show my address ' . variable_get('site_name', 'Warehouse'), '', array('attributes' => array('id' => 'show_address', 'class' => array('ui-button', 'my-address-toggle'))));?></div>
    <div id="address_reminder" style="display: none;">
        <p>This address should be used when shopping online shops:
            <span><?php print l('Hide', '', array('attributes' => array('id' => 'hide_address', 'class' => array('my-address-toggle'))));?></span>
        </p>
        <dl>
            <dt>Name:</dt>
            <dd><?php print $user_info->name;?></dd>
            <dt>Address Line 1:</dt>
            <dd><?php print $store_address->address;?></dd>
            <dt>Address Line 2:</dt>
            <dd><?php print 'Suite ' . $user->uid;?></dd>
            <dt>City:</dt>
            <dd><?php print $store_address->city;?></dd>
            <dt>State:</dt>
            <dd><?php print $store_address->state;?></dd>
            <dt>Zip:</dt>
            <dd><?php print $store_address->zip;?></dd>
            <dt>Phone:</dt>
            <dd><?php print $store_address->phone;?></dd>
        </dl>
    </div>
    <div id="finances">
        <h2>Recent surgery</h2>

        <div class="transactions_list">
            <p style="color: #999">
                Payment / VISA, MasterCard
                <span class="amount">$ 0,00</span>
            </p>
        </div>
        <p style="font-size: 14px">Balance:
            <span class="cost_total"><?php print '$ ' . number_format($user_info->balance, 2);?></span></p>
        <?php print l('Fill', 'credits/new', array('attributes' => array('class' => array('ui-button'))));?>
    </div>
    <div class="clear"></div>
    <div class="user-orders">
        <h2>Orders from the shop</h2>

        <div class="display" id="not_assigned">
            <?php print $data['orders'];?>
        </div>
    </div>
</div>
